package com.biz.primus.base.vo;

import lombok.Data;

import java.io.Serializable;

@Data
public class ExtendProductVo implements Serializable {

    /**
     * 扩展属性唯一标识
     */
    private String key;

    /**
     * 扩展属性显示名称
     */
    private String label;

    /**
     * 扩展属性的值
     */
    private String value;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        ExtendProductVo that = (ExtendProductVo) o;

        if (key != null ? !key.equals(that.key) : that.key != null) return false;
        if (label != null ? !label.equals(that.label) : that.label != null) return false;
        return value != null ? value.equals(that.value) : that.value == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (key != null ? key.hashCode() : 0);
        result = 31 * result + (label != null ? label.hashCode() : 0);
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }
}
